# -*- coding: utf-8 -*-
# @Time    : 2020/3/20 9:28
# @Author  : Weymouth
# @Email   : 261229090@qq.com
# @File    : shelve_test.py
# @Software: PyCharm
# ---------------------------------------------------

import shelve

f = shelve.open('SHELVE_text')

f['info'] = {'name': 'abc', 'age': '18'}
data = f.get('info')
print(f.get('sex', 'male'))